using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for LOAINHANVIEN.
     /// </summary>
     public class LOAINHANVIEN
    {
              private Int32 _MALOAI;
      private string _TENLOAI;
      private bool _ISUSE;
      private NHANVIENList _listNHANVIEN;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMALOAINullable
      { get { return false;  } }
      public Int32 MALOAI
      {
         get { return _MALOAI; }
         set { _MALOAI = value; }
      }
      public bool IsTENLOAINullable
      { get { return true;  } }
      public string TENLOAI
      {
         get { return _TENLOAI;  }
         set { _TENLOAI = value; }
      }
      public bool IsISUSENullable
      { get { return true;  } }
      public bool ISUSE
      {
         get { return _ISUSE;  }
         set { _ISUSE = value; }
      }
public NHANVIENList NHANVIENList 
{ 
	get { return _listNHANVIEN; }
	set { _listNHANVIEN = value;}
}

        #endregion

        #region Constructors
        public LOAINHANVIEN()
        {
            Reset();
        }
        public LOAINHANVIEN(LOAINHANVIEN obj)
        {
            	this._MALOAI = obj.MALOAI;
	this._TENLOAI = obj.TENLOAI;
	this._ISUSE = obj.ISUSE;
        }
        #endregion

        public void Reset()
        {
                     _MALOAI = EmptyValues.v_Int32;
         _TENLOAI = EmptyValues.v_string;
         _ISUSE = EmptyValues.v_bool;
	_listNHANVIEN = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MALOAI"] is DBNull))
		{
			obj.MALOAI = (Int32)reader["MALOAI"];
		}
                if(!(reader["TENLOAI"] is DBNull))
		{
			obj.TENLOAI = (string)reader["TENLOAI"];
		}
                if(!(reader["ISUSE"] is DBNull))
		{
			obj.ISUSE = (bool)reader["ISUSE"];
		}
//            _MALOAI = (reader["MALOAI"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MALOAI"];
//            _TENLOAI = (reader["TENLOAI"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TENLOAI"];
//            _ISUSE = (reader["ISUSE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISUSE"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 MALOAI, string TENLOAI, bool ISUSE)
        {
                     this._MALOAI = MALOAI;
         this._TENLOAI = TENLOAI;
         this._ISUSE = ISUSE;
        }
    }
}